<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2019/10/21
 * Time: 17:10
 */

namespace app\common\service;


use think\Db;

class ServerRandCode
{
    /**
     * @name 查询
     * @param $condition
     * @return array|null|\PDOStatement|string|\think\Model
     * @author wx
     * @date 2019/10/21 16:45
     */
    public function findData($condition)
    {
        return Db::name('server_rand_code')->where($condition)->find();
    }

    /**
     * @name 添加
     * @param $data
     * @return int|string
     * @author wx
     * @date 2019/10/22 11:18
     */
    public function add($data)
    {
        return Db::name('server_rand_code')->insert($data);
    }

    /**
     * @name 修改
     * @param $condition
     * @param $updateData
     * @return int|string
     * @author wx
     * @date 2019/10/22 11:18
     */
    public function modify($condition, $updateData)
    {
        return Db::name('server_rand_code')->where($condition)->update($updateData);
    }
}